<?php
abstract class BaseGridController extends Controller
{
    public function GetConfig()
    {
        return GridConfig::GetInstance();
    }

    protected function GetLayout()
    {
        return new BlankLayout();
    }

	public function Index($view_id)
	{
        $grid = GridControl::GetInstance($view_id, 'grid');
        $this->Replace('grid', $grid->RenderStub());
    	return $this->Render();
	}

    public function InsertDrilldownUrl()
    {
        VmViewModel::InsertDrilldownUrl();
        return $this->Render();
    }

    public function DetectFields($viewId)
    {
        VmFieldModel::GetInstance()->InsertFields($viewId);
        return $this->Render();
    }
}
?>